-
-
Notifications
You must be signed in to change notification settings - Fork 18.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BUG: Fix #25481 by fixing the error message in TypeError #25540
Conversation
@Bharat123rox : a bug fix requires a whatsnew entry... and maybe more tests. these tests hit the line of code changed..
so it may be possible to just use the match parameter of pytest.raises in these tests. |
Codecov Report
@@ Coverage Diff @@
## master #25540 +/- ##
===========================================
- Coverage 91.75% 41.71% -50.05%
===========================================
Files 173 173
Lines 52960 52960
===========================================
- Hits 48596 22091 -26505
- Misses 4364 30869 +26505
Continue to review full report at Codecov.
|
Codecov Report
@@ Coverage Diff @@
## master #25540 +/- ##
=========================================
- Coverage 91.75% 91.26% -0.5%
=========================================
Files 173 173
Lines 52960 52966 +6
=========================================
- Hits 48596 48337 -259
- Misses 4364 4629 +265
Continue to review full report at Codecov.
|
doc/source/whatsnew/v0.25.0.rst
Outdated
@@ -121,7 +121,7 @@ Performance Improvements | |||
Bug Fixes | |||
~~~~~~~~~ | |||
- Bug in :func:`to_datetime` which would raise an (incorrect) ``ValueError`` when called with a date far into the future and the ``format`` argument specified instead of raising ``OutOfBoundsDatetime`` (:issue:`23830`) | |||
- | |||
- Bug in :func: `plot` for a `pd.Series` or a `pd.DataFrame` which had a confusing error message mentioning an "Empty" DataFrame, now raises ``TypeError: no numeric data to plot`` (:issue:`25481`) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just refer to it as :meth:`DataFrame.plot`.
Probably don't need to include the error message here. Rather, say something like "Improved the error message of ..."
lgtm. @TomAugspurger |
pandas/plotting/_core.py
Outdated
@@ -360,8 +360,7 @@ def _compute_plot_data(self): | |||
|
|||
# no empty frames or series allowed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not a blocker for me but might be nice to clarify this comment. On initial glance it implies to me that the entire passed Frame might have been empty, whereas it really only y applies where numeric data doesn't exist, which is slightly different
thanks @Bharat123rox |
* upstream/master: (110 commits) DOC: hardcode contributors for 0.24.x releases (pandas-dev#25662) DOC: restore toctree maxdepth (pandas-dev#25134) BUG: Redefine IndexOpsMixin.size, fix pandas-dev#25580. (pandas-dev#25584) BUG: to_csv line endings with compression (pandas-dev#25625) DOC: file obj for to_csv must be newline='' (pandas-dev#25624) Suppress incorrect warning in nargsort for timezone-aware DatetimeIndex (pandas-dev#25629) TST: fix incorrect sparse test (now failing on scipy master) (pandas-dev#25653) CLN: Removed debugging code (pandas-dev#25647) DOC: require Return section only if return is not None nor commentary (pandas-dev#25008) DOC:Remove hard-coded examples from _flex_doc_SERIES (pandas-dev#24589) (pandas-dev#25524) TST: xref pandas-dev#25630 (pandas-dev#25643) BUG: Fix pandas-dev#25481 by fixing the error message in TypeError (pandas-dev#25540) Fixturize tests/frame/test_mutate_columns.py (pandas-dev#25642) Fixturize tests/frame/test_join.py (pandas-dev#25639) Fixturize tests/frame/test_combine_concat.py (pandas-dev#25634) Fixturize tests/frame/test_asof.py (pandas-dev#25628) BUG: Fix user-facing AssertionError with to_html (pandas-dev#25608) (pandas-dev#25620) DOC: resolve all GL03 docstring validation errors (pandas-dev#25525) TST: failing wheel building on PY2 and old numpy (pandas-dev#25631) DOC: Remove makePanel from docs (pandas-dev#25609) (pandas-dev#25612) ...
BUG: Fix #25481 by fixing the error message in TypeError
git diff upstream/master -u -- "*.py" | flake8 --diff